bashcompdir = $(datadir)/$(PACKAGE)/completions
bashcomp_DATA = 2to3 \
		7z \
		a2x \
		abook \
		aclocal \
		acpi \
		_adb \
		add_members \
		alias \
		ant \
		apache2ctl \
		appdata-validate \
		apt-build \
		apt-cache \
		apt-get \
		apt-mark \
		aptitude \
		arch \
		arp \
		arping \
		arpspoof \
		asciidoc \
		aspell \
		autoconf \
		automake \
		autoreconf \
		autorpm \
		autoscan \
		avahi-browse \
		avctrl \
		badblocks \
		bind \
		bk \
		brctl \
		btdownloadheadless.py \
		bts \
		bzip2 \
		_cal \
		cancel \
		cardctl \
		carton \
		ccache \
		ccze \
		cfagent \
		cfrun \
		chage \
		change_pw \
		check_db \
		check_perms \
		checksec \
		_chfn \
		chgrp \
		chkconfig \
		chmod \
		chown \
		chpasswd \
		chromium-browser \
		chronyc \
		chrpath \
		_chsh \
		cksfv \
		cleanarch \
		clisp \
		clone_member \
		complete \
		config_list \
		configure \
		convert \
		cowsay \
		cpan2dist \
		cpio \
		cppcheck \
		crontab \
		cryptsetup \
		curl \
		cvs \
		cvsps \
		dd \
		declare \
		deja-dup \
		desktop-file-validate \
		dhclient \
		dict \
		_dmesg \
		dmypy \
		dnssec-keygen \
		dnsspoof \
		dot \
		dpkg \
		dpkg-source \
		dselect \
		dsniff \
		dumpdb \
		dumpe2fs \
		e2freefrag \
		e2label \
		ebtables \
		ecryptfs-migrate-home \
		_eject \
		eog \
		ether-wake \
		evince \
		explodepkg \
		export \
		faillog \
		fbgs \
		fbi \
		feh \
		file \
		file-roller \
		filefrag \
		filesnarf \
		find \
		find_member \
		fio \
		firefox \
		flake8 \
		freebsd-update \
		freeciv \
		freeciv-server \
		function \
		fusermount \
		gcc \
		gcl \
		gdb \
		genaliases \
		gendiff \
		genisoimage \
		geoiplookup \
		getconf \
		getent \
		gkrellm \
		gm \
		gnatmake \
		gnokii \
		gnome-mplayer \
		gnome-screenshot \
		gpasswd \
		gpg \
		gpg2 \
		gpgv \
		gphoto2 \
		gprof \
		groupadd \
		groupdel \
		groupmems \
		groupmod \
		growisofs \
		grpck \
		gssdp-discover \
		gzip \
		hcitool \
		hddtemp \
		_hexdump \
		hid2hci \
		hostname \
		hping2 \
		htop \
		htpasswd \
		hunspell \
		_hwclock \
		iconv \
		id \
		idn \
		ifstat \
		iftop \
		ifup \
		influx \
		info \
		inject \
		inotifywait \
		insmod \
		installpkg \
		interdiff \
		invoke-rc.d \
		_ionice \
		ip \
		ipcalc \
		iperf \
		ipmitool \
		ipsec \
		iptables \
		ipv6calc \
		iscsiadm \
		isort \
		isql \
		iwconfig \
		iwlist \
		iwpriv \
		iwspy \
		jar \
		jarsigner \
		java \
		javaws \
		jq \
		jpegoptim \
		jps \
		jshint \
		json_xs \
		jsonschema \
		k3b \
		kcov \
		kill \
		killall \
		kldload \
		kldunload \
		koji \
		ktutil \
		larch \
		lastlog \
		ldapsearch \
		ldapvi \
		lftp \
		lftpget \
		lilo \
		links \
		lintian \
		lisp \
		list_admins \
		list_lists \
		list_members \
		list_owners \
		_look \
		locale-gen \
		lpq \
		lpr \
		lrzip \
		lsof \
		lsscsi \
		lsusb \
		lua \
		luac \
		luseradd \
		luserdel \
		lvm \
		lz4 \
		lzip \
		lzma \
		lzop \
		macof \
		mailmanctl \
		make \
		makepkg \
		man \
		mc \
		mcrypt \
		mdadm \
		mdtool \
		medusa \
		mii-diag \
		mii-tool \
		minicom \
		mkinitrd \
		mktemp \
		mmsitepass \
		_mock \
		modinfo \
		modprobe \
		_modules \
		monodevelop \
		_mount \
		_mount.linux \
		mplayer \
		mr \
		msynctool \
		mtx \
		munindoc \
		munin-node-configure \
		munin-run \
		munin-update \
		mussh \
		mutt \
		mypy \
		mysql \
		mysqladmin \
		nc \
		ncftp \
		nethogs \
		_newgrp \
		newlist \
		newusers \
		ngrep \
		nmap \
		_nmcli \
		nproc \
		nslookup \
		nsupdate \
		ntpdate \
		oggdec \
		_op \
		openssl \
		opera \
		optipng \
		p4 \
		pack200 \
		passwd \
		patch \
		pdftoppm \
		pdftotext \
		perl \
		perlcritic \
		perltidy \
		pgrep \
		pidof \
		pine \
		ping \
		pkg-config \
		pkg-get \
		pkg_delete \
		pkgadd \
		pkgrm \
		pkgtool \
		pkgutil \
		plague-client \
		pm-hibernate \
		pm-is-supported \
		pm-powersave \
		pngfix \
		portinstall \
		portsnap \
		portupgrade \
		postcat \
		postconf \
		postfix \
		postmap \
		postsuper \
		povray \
		prelink \
		printenv \
		protoc \
		ps \
		psql \
		puppet \
		pv \
		pwck \
		pwd \
		pwdx \
		pwgen \
		pycodestyle \
		pydoc \
		pydocstyle \
		pyflakes \
		pylint \
		pytest \
		python \
		pyvenv \
		qdbus \
		qemu \
		qrunner \
		querybts \
		quota \
		radvdump \
		rcs \
		rdesktop \
		remove_members \
		removepkg \
		_renice \
		_repomanage \
		reportbug \
		_reptyr \
		resolvconf \
		_rfkill \
		ri \
		rmlist \
		rmmod \
		route \
		rpcdebug \
		rpm \
		rpm2tgz \
		rpmcheck \
		rrdtool \
		rsync \
		_rtcwake \
		_runuser \
		sbcl \
		sbopkg \
		screen \
		scrub \
		secret-tool \
		sh \
		sha256sum \
		shellcheck \
		sitecopy \
		_slackpkg \
		slapt-get \
		slapt-src \
		smartctl \
		smbclient \
		snownews \
		sqlite3 \
		ss \
		ssh \
		ssh-add \
		ssh-copy-id \
		ssh-keygen \
		ssh-keyscan \
		sshfs \
		sshmitm \
		sshow \
		strace \
		strings \
		_su \
		sudo \
		svcadm \
		svk \
		_svn \
		_svnadmin \
		_svnlook \
		sync_members \
		synclient \
		sysbench \
		sysctl \
		tar \
		tcpdump \
		tcpkill \
		tcpnice \
		timeout \
		tipc \
		tox \
		tracepath \
		tree \
		tshark \
		tsig-keygen \
		tune2fs \
		_udevadm \
		ulimit \
		_umount \
		_umount.linux \
		unace \
		unpack200 \
		unrar \
		unshunt \
		update-alternatives \
		update-rc.d \
		upgradepkg \
		urlsnarf \
		useradd \
		userdel \
		usermod \
		valgrind \
		vipw \
		vmstat \
		vncviewer \
		vpnc \
		watch \
		webmitm \
		wget \
		wine \
		withlist \
		wodim \
		wol \
		_write \
		wsimport \
		wtf \
		wvdial \
		xdg-mime \
		xdg-settings \
		xev \
		xfreerdp \
		xgamma \
		xhost \
		_xm \
		xmllint \
		xmlwf \
		xmms \
		xmodmap \
		xrandr \
		xrdb \
		xsltproc \
		xvfb-run \
		xxd \
		xz \
		xzdec \
		ypmatch \
		_yum \
		yum-arch \
		zopfli \
		zopflipng

EXTRA_DIST = $(bashcomp_DATA)

CLEANFILES = \
	7za \
	aclocal-1.10 \
	aclocal-1.11 \
	aclocal-1.12 \
	aclocal-1.13 \
	aclocal-1.14 \
	aclocal-1.15 \
	aclocal-1.16 \
	alpine \
	alternatives \
	animate \
	apropos \
	aptitude-curses \
	arm-koji \
	asciidoc.py \
	autoheader \
	automake-1.10 \
	automake-1.11 \
	automake-1.12 \
	automake-1.13 \
	automake-1.14 \
	automake-1.15 \
	automake-1.16 \
	autossh \
	autoupdate \
	avahi-browse-domains \
	bmake \
	bsdtar \
	btdownloadcurses.py \
	btdownloadgui.py \
	c++ \
	cc \
	cdrecord \
	chrome \
	chromium \
	ci \
	ciptool \
	civclient \
	civserver \
	clzip \
	co \
	colormake \
	compare \
	compgen \
	composite \
	conjure \
	cowthink \
	createdb \
	createuser \
	dcop \
	dfutool \
	display \
	dpkg-deb \
	dpkg-query \
	dpkg-reconfigure \
	dropdb \
	dropuser \
	edquota \
	etherwake \
	f77 \
	f95 \
	filebucket \
	firefox-esr \
	freeciv-gtk2 \
	freeciv-gtk3 \
	freeciv-sdl \
	freeciv-xaw \
	g++ \
	g++-5 \
	g++-6 \
	g++-7 \
	g++-8 \
	g4 \
	g77 \
	g95 \
	gcc-5 \
	gcc-6 \
	gcc-7 \
	gcc-8 \
	gccgo \
	gccgo-5 \
	gccgo-6 \
	gccgo-7 \
	gccgo-8 \
	gcj \
	geoiplookup6 \
	gfortran \
	gfortran-5 \
	gfortran-6 \
	gfortran-7 \
	gfortran-8 \
	gkrellm2 \
	gmake \
	gmplayer \
	gnumake \
	google-chrome \
	google-chrome-stable \
	gpc \
	gpgv2 \
	gssdp-device-sniffer \
	gtar \
	hciattach \
	hciconfig \
	hd \
	host \
	hping \
	hping3 \
	iceweasel \
	identify \
	ifdown \
	ifquery \
	ifstatus \
	import \
	inotifywatch \
	insmod.static \
	iperf3 \
	javac \
	javadoc \
	kplayer \
	l2ping \
	lbzip2 \
	ldapadd \
	ldapcompare \
	ldapdelete \
	ldapmodify \
	ldapmodrdn \
	ldappasswd \
	ldapwhoami \
	links2 \
	lintian-info \
	lua50 \
	lua5.0 \
	lua51 \
	lua5.1 \
	lua52 \
	lua5.2 \
	lua53 \
	lua5.3 \
	lua54 \
	lua5.4 \
	luac50 \
	luac5.0 \
	luac51 \
	luac5.1 \
	luac52 \
	luac5.2 \
	luac53 \
	luac5.3 \
	luac54 \
	luac5.4 \
	lusermod \
	lvchange \
	lvcreate \
	lvdisplay \
	lvextend \
	lvmdiskscan \
	lvreduce \
	lvremove \
	lvrename \
	lvresize \
	lvs \
	lvscan \
	lz4c \
	mailsnarf \
	md5sum \
	mdecrypt \
	mencoder \
	micropython \
	mkisofs \
	mogrify \
	montage \
	mozilla-firefox \
	mplayer2 \
	msgsnarf \
	muttng \
	ncal \
	neomutt \
	pbzip2 \
	pccardctl \
	pdlzip \
	perldoc \
	phing \
	pigz \
	pinfo \
	ping6 \
	pkg_deinstall \
	pkg_info \
	pkgconf \
	pkill \
	plzip \
	pm-suspend \
	pm-suspend-hybrid \
	pmake \
	postalias \
	ppc-koji \
	puppetca \
	puppetd \
	puppetdoc \
	puppetmasterd \
	puppetqd \
	puppetrun \
	pvchange \
	pvcreate \
	pvdisplay \
	pvmove \
	pvremove \
	pvs \
	pvscan \
	pxz \
	py.test \
	py.test-2 \
	py.test-3 \
	pydoc3 \
	pylint-2 \
	pylint-3 \
	pypy \
	pypy3 \
	pyston \
	pyston3 \
	pytest-2 \
	pytest-3 \
	python2 \
	python2.7 \
	python3 \
	python3.3 \
	python3.4 \
	python3.5 \
	python3.6 \
	python3.7 \
	python3.8 \
	python3.9 \
	python3.10 \
	python3.11 \
	pyvenv-3.4 \
	pyvenv-3.5 \
	pyvenv-3.6 \
	pyvenv-3.7 \
	pyvenv-3.8 \
	pyvenv-3.9 \
	pyvenv-3.10 \
	pyvenv-3.11 \
	qemu-kvm \
	qemu-system-i386 \
	qemu-system-x86_64 \
	quotacheck \
	quotaoff \
	quotaon \
	ralsh \
	rcsdiff \
	rdict \
	repquota \
	rfcomm \
	rlog \
	rpm2targz \
	rpm2txz \
	rpmbuild \
	rpmbuild-md5 \
	s390-koji \
	sbcl-mt \
	scp \
	sdptool \
	setquota \
	sftp \
	shasum \
	sha1sum \
	sha224sum \
	sha384sum \
	sha512sum \
	sidedoor \
	slogin \
	smbcacls \
	smbcquotas \
	smbget \
	smbpasswd \
	smbtar \
	smbtree \
	sparc-koji \
	spovray \
	star \
	stream \
	sudoedit \
	tightvncviewer \
	tracepath6 \
	typeset \
	vgcfgbackup \
	vgcfgrestore \
	vgchange \
	vgck \
	vgconvert \
	vgcreate \
	vgdisplay \
	vgexport \
	vgextend \
	vgimport \
	vgmerge \
	vgmknodes \
	vgreduce \
	vgremove \
	vgrename \
	vgs \
	vgscan \
	vgsplit \
	vigr \
	whatis \
	wine-development \
	wine-stable \
	wine64 \
	wine64-development \
	wine64-stable \
	xpovray \
	xvnc4viewer \
	ypcat

symlinks: $(DATA)
	$(ss) 7z \
		7za
	$(ss) aclocal \
		aclocal-1.10 aclocal-1.11 aclocal-1.12 aclocal-1.13 \
		aclocal-1.14 aclocal-1.15 aclocal-1.16
	$(ss) ant \
		phing
	$(ss) aptitude \
		aptitude-curses
	$(ss) asciidoc \
		asciidoc.py
	$(ss) automake \
		automake-1.10 automake-1.11 automake-1.12 automake-1.13 \
		automake-1.14 automake-1.15 automake-1.16
	$(ss) autoreconf \
		autoheader
	$(ss) autoscan \
		autoupdate
	$(ss) avahi-browse \
		avahi-browse-domains
	$(ss) btdownloadheadless.py \
		btdownloadcurses.py btdownloadgui.py
	$(ss) bzip2 \
		lbzip2 pbzip2
	$(ss) _cal \
		ncal
	$(ss) cardctl \
		pccardctl
	$(ss) chromium-browser \
		chrome chromium google-chrome google-chrome-stable
	$(ss) complete \
		compgen
	$(ss) convert \
		animate compare composite conjure display identify import \
		mogrify montage stream
	$(ss) cowsay \
		cowthink
	$(ss) declare \
		typeset
	$(ss) dict \
		rdict
	$(ss) dpkg \
		dpkg-deb dpkg-query dpkg-reconfigure
	$(ss) ether-wake \
		etherwake
	$(ss) filesnarf \
		mailsnarf msgsnarf
	$(ss) firefox \
		firefox-esr iceweasel mozilla-firefox
	$(ss) freeciv \
		civclient freeciv-gtk2 freeciv-gtk3 freeciv-sdl freeciv-xaw
	$(ss) freeciv-server \
		civserver
	$(ss) gcc \
		c++ cc f77 f95 g++ g++-5 g++-6 g++-7 g++-8 g77 g95 gcc-5 \
		gcc-6 gcc-7 gcc-8 gccgo gccgo-5 gccgo-6 gccgo-7 gccgo-8 gcj \
		gfortran gfortran-5 gfortran-6 gfortran-7 gfortran-8 gpc
	$(ss) genisoimage \
		mkisofs
	$(ss) geoiplookup \
		geoiplookup6
	$(ss) gkrellm \
		gkrellm2
	$(ss) gpgv \
		gpgv2
	$(ss) gssdp-discover \
		gssdp-device-sniffer
	$(ss) gzip \
		pigz
	$(ss) hcitool \
		ciptool dfutool hciattach hciconfig l2ping rfcomm sdptool
	$(ss) _hexdump \
		hd
	$(ss) hping2 \
		hping hping3
	$(ss) ifup \
		ifdown ifquery ifstatus
	$(ss) info \
		pinfo
	$(ss) inotifywait \
		inotifywatch
	$(ss) insmod \
		insmod.static
	$(ss) iperf \
		iperf3
	$(ss) java \
		javac javadoc
	$(ss) koji \
		arm-koji ppc-koji s390-koji sparc-koji
	$(ss) ldapsearch \
		ldapadd ldapcompare ldapdelete ldapmodify ldapmodrdn \
		ldappasswd ldapwhoami
	$(ss) links \
		links2
	$(ss) lintian \
		lintian-info
	$(ss) lua \
		lua50 lua5.0 lua51 lua5.1 lua52 lua5.2 lua53 lua5.3 lua54 \
		lua5.4
	$(ss) luac \
		luac50 luac5.0 luac51 luac5.1 luac52 luac5.2 luac53 luac5.3 \
		luac54 luac5.4
	$(ss) luseradd \
		lusermod
	$(ss) lvm \
		lvchange lvcreate lvdisplay lvextend lvmdiskscan lvreduce \
		lvremove lvrename lvresize lvs lvscan pvchange pvcreate \
		pvdisplay pvmove pvremove pvs pvscan vgcfgbackup vgcfgrestore \
		vgchange vgck vgconvert vgcreate vgdisplay vgexport vgextend \
		vgimport vgmerge vgmknodes vgreduce vgremove vgrename vgs \
		vgscan vgsplit
	$(ss) lz4 \
		lz4c
	$(ss) lzip \
		clzip pdlzip plzip
	$(ss) make \
		bmake colormake gmake gnumake pmake
	$(ss) man \
		apropos whatis
	$(ss) mcrypt \
		mdecrypt
	$(ss) mplayer \
		gmplayer kplayer mencoder mplayer2
	$(ss) mutt \
		muttng neomutt
	$(ss) nslookup \
		host
	$(ss) p4 \
		g4
	$(ss) perl \
		perldoc
	$(ss) pine \
		alpine
	$(ss) ping \
		ping6
	$(ss) pkg-config \
		pkgconf
	$(ss) pkg_delete \
		pkg_deinstall pkg_info
	$(ss) pgrep \
		pkill
	$(ss) pm-hibernate \
		pm-suspend pm-suspend-hybrid
	$(ss) psql \
		createdb createuser dropdb dropuser
	$(ss) postmap \
		postalias
	$(ss) povray \
		spovray xpovray
	$(ss) puppet \
		filebucket puppetca puppetd puppetdoc puppetmasterd puppetqd \
		puppetrun ralsh
	$(ss) pytest \
		py.test py.test-2 py.test-3 pytest-2 pytest-3
	$(ss) pydoc \
		pydoc3
	$(ss) pylint \
		pylint-2 pylint-3
	$(ss) python \
		micropython pypy pypy3 pyston pyston3 python2 python2.7 \
		python3 python3.3  python3.4 python3.5 python3.6 python3.7 \
		python3.8 python3.9 python3.10 python3.11
	$(ss) pyvenv \
		pyvenv-3.4 pyvenv-3.5 pyvenv-3.6 pyvenv-3.7 pyvenv-3.8 \
		pyvenv-3.9 pyvenv-3.10 pyvenv-3.11
	$(ss) qdbus \
		dcop
	$(ss) qemu \
		qemu-kvm qemu-system-i386 qemu-system-x86_64
	$(ss) quota \
		edquota quotacheck quotaoff quotaon repquota setquota
	$(ss) rcs \
		ci co rcsdiff rlog
	$(ss) rpm \
		rpmbuild rpmbuild-md5
	$(ss) rpm2tgz \
		rpm2targz rpm2txz
	$(ss) smbclient \
		smbcacls smbcquotas smbget smbpasswd smbtar smbtree
	$(ss) sbcl \
		sbcl-mt
	$(ss) sha256sum \
		md5sum shasum sha1sum sha224sum sha384sum sha512sum
	$(ss) ssh \
		autossh scp sftp sidedoor slogin
	$(ss) sudo \
		sudoedit
	$(ss) tar \
		bsdtar gtar star
	$(ss) tracepath \
		tracepath6
	$(ss) update-alternatives \
		alternatives
	$(ss) vipw \
		vigr
	$(ss) vncviewer \
		tightvncviewer xvnc4viewer
	$(ss) wine \
		wine-development wine-stable \
		wine64 wine64-development wine64-stable
	$(ss) wodim \
		cdrecord
	$(ss) xz \
		pxz
	$(ss) ypmatch \
		ypcat
.PHONY: symlinks

SETUP_SYMLINKS = $(srcdir)/../setup-symlinks.sh

all-local: ss = $(SETUP_SYMLINKS) .
all-local: symlinks

install-data-hook: ss = $(SETUP_SYMLINKS) $(DESTDIR)$(bashcompdir)
install-data-hook: symlinks

check-local:
	ret=0; \
	for file in $(bashcomp_DATA); do \
		$${bashcomp_bash:-$${BASH:-bash}} \
			-O extglob -n $(srcdir)/$$file || ret=$$?; \
	done; \
	exit $$ret
